<%@ page
	import="java.util.*,com.db.tracker.vo.*,java.util.*,com.db.tracker.util.*,java.text.*,java.io.*"%>
<%
		try {
		session = request.getSession();

		//	temporary removed enable this line for login, and remove if(false){
		if (session.getAttribute("USER_ID") == null || !((String) session.getAttribute("SESSION_ID")).equals(session.getId())) {

			//	if(false){
			try {
				response.sendRedirect("LoginPage.jsp");
			} catch (IOException ioe) {
				ioe.printStackTrace();
			}

		} else {


			
			DBUtil dbutil = new DBUtil(getServletContext());
			String userid = (String) session.getAttribute("USER_ID") == null ? "": (String) session.getAttribute("USER_ID");
%>
<html>
<head>
<link type="text/css" rel="stylesheet" href="styles/tracker_style.css">
<title>Data Server Status Report</title>
<script>


</script>
</head>

<body>
<table width="100%">
	<tr>
		<td width=100%><jsp:include page="HeaderNav_ReleaseObject.jsp" /></td>
	</tr>
</table>
<%
			Vector dataServerInfo = dbutil.getDataServerInfo();
%>




<a href="mainpage.jsp">Back to Main.</a>

<table>
	<tr>
		<td align=right>&nbsp</td>
	</tr>
</table>


<table>
	<tr>
		<td>&nbsp</td>
	</tr>
</table>

<table cellpadding="0" cellspacing="1" width="90%"
	style="BORDER:#000000 1px solid" align='center' colspan=9>
	<tr bgcolor=#000077>
		<td class=smallfonthead align=left colspan=9><b>Data Server Info</b></td>
	</tr>

	<%
				if (dataServerInfo != null && dataServerInfo.size() > 0) {
	%>
	<tr bgcolor=#000077>
		<td class=smallfonthead align=left width='2%' colspan=1><b>#</b></td>
		<td class=smallfonthead align=left width='10%' colspan=1><b>Data Server</b></td>
		<td class=smallfonthead align=left width='15%' colspan=1><b>Dataserver Host Name</b></td>
		<td class=smallfonthead align=left width='13%' colspan=1><b>IP Address</b></td>
		<td class=smallfonthead align=left width='10%' colspan=1><b>NY Shortcut Path</b></td>
		<td class=smallfonthead align=left width='10%' colspan=1><b>LN Shortcut Path</b></td>
		<td class=smallfonthead align=left width='10%' colspan=1><b>Refreshed (Freq)</b></td>
		<td class=smallfonthead align=left width='15%' colspan=1><b>Databases Refreshed</b></td>
		<td class=smallfonthead align=left width='15%' colspan=1><b>Remarks</b></td>
	</tr>	
	<% 
			for (int i = 0; i < dataServerInfo.size(); i++) {
				DBServerBean serverBean = (DBServerBean) dataServerInfo.elementAt(i);
				
				String bacColor="#C2D6EB";
				if(i%2==0){
					bacColor = "#efefef";
				}	
	%>


	<tr bgcolor=<%=bacColor %>>
		<td class=bodyblue align=center><%=i + 1%></td>
		<td class=bodyblue align=left><%=serverBean.getDataServer()%></td>
		<td class=bodyblue align=left><%=serverBean.getDataServerHost()%></td>
		<td class=bodyblue align=left><%=serverBean.getIP()%></td>
		<td class=bodyblue align=left><%=serverBean.getNYShortPath()%></td>	
		<td class=bodyblue align=left><%=serverBean.getLNShortPath()%></td>
		<td class=bodyblue align=left><%=serverBean.getRefreshFreq()%></td>
		<td class=bodyblue align=left><%=serverBean.getDBsRefreshed()%></td>
		<td class=bodyblue align=left><%=serverBean.getRemarks()%></td>
	</tr>
	
	

	<%
				}
				} else {
	%>
	<tr bgcolor=#000077>
		<td class=smallfonthead align="center" colspan=9><b>Not any Data Server Information found...</b></td>
	</tr>
	<%
	}
	%>
</table>



</body>
</html>





<%
	}
	} catch (Exception e) {
		e.printStackTrace();
	}
%>
